package org.example.api.search.controller;

import org.example.api.search.controller.request.GoodsSearchRequest;
import org.example.api.search.controller.response.GoodsDocSummeryResponse;
import org.example.frw.api.base.response.PageResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        name = "search-server",
        contextId = "search",
        path = "/search-server"
)
public interface SearchControllerFeign {
  /**
   * 分页查询商品
   * @param request request
   * @return GoodsDocSummeryResponse
   */
  @PostMapping("/goods/search")
  PageResponse<GoodsDocSummeryResponse> searchGoods(@RequestBody GoodsSearchRequest request);

}
